home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / ShareMailGiftware / WHDload_Paket / WHDload_Demos / Andromeda_Mindriot.lha / Mindriot / Install_Mindriot next >
Text File  |  2000-10-29  |  2KB  |  100 lines

  1. ;****************************
  2.  
  3. (set #readme-file "mindriothd.readme")    ;name of readme file
  4. (set #cleanup "")        ;files to delete after install
  5.  
  6. ;****************************
  7.  
  8. ;----------------------------
  9. ; Checks if given program is reachable via the path
  10. ; if not abort install
  11. ; IN:  #program - to check
  12. ; OUT: -
  13.  
  14. (procedure P_chkrun
  15.   (if
  16.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  17.     ("")
  18.     (abort ("You must install \"%s\" first !\nIt must be accessible via the path.\nYou can find it in the WHDLoad package." #program))
  19.   )
  20. )
  21.  
  22. ;****************************
  23.  
  24. (if
  25.   (exists #readme-file)
  26.   (if
  27.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  28.     ("")
  29.     (run ("SYS:Utilities/More %s" #readme-file))
  30.   )
  31. )
  32.  
  33. (set #program "WHDLoad")
  34. (P_chkrun)
  35.  
  36. (set @default-dest
  37.   (askdir
  38.     (prompt ("Where is \"%s\" installed ?\n" @app-name))
  39.     (help @askdir-help)
  40.     (default @default-dest)
  41.     (disk)
  42.   )
  43. )
  44.  
  45. (set #dest (tackon @default-dest @default-dest))
  46.  
  47. ;----------------------------
  48.  
  49. (copyfiles
  50.   (help @copyfiles-help)
  51.   (source ("%s.Slave" @app-name))
  52.   (dest #dest)
  53. )
  54. (if
  55.   (exists ("%s.newicon" @app-name))
  56.   (set #icon
  57.     (askchoice
  58.       (prompt "\nWhich icon do you like to install ?\n")
  59.       (default 0)
  60.       (choices "Normal" "NewIcon")
  61.       (help @askchoice-help)
  62.     )
  63.   )
  64.   (set #icon 0)
  65. )
  66. (select #icon
  67.   (set #icon ("%s.inf" @app-name))
  68.   (set #icon ("%s.newicon" @app-name))
  69. )
  70. (copyfiles
  71.   (help @copyfiles-help)
  72.   (source #icon)
  73.   (newname ("%s.info" @app-name))
  74.   (dest #dest)
  75. )
  76. (if
  77.   (exists #readme-file)
  78.   (copyfiles
  79.     (help @copyfiles-help)
  80.     (source #readme-file)
  81.     (dest #dest)
  82.   )
  83. )
  84. (if
  85.   (exists ("%s.info" #readme-file))
  86.   (copyfiles
  87.     (help @copyfiles-help)
  88.     (source ("%s.info" #readme-file))
  89.     (dest #dest)
  90.   )
  91. )
  92.  
  93. (run ("cd \"%s\"\nRename Andromeda.MindRiot Mindriot.exe" #dest))
  94.  
  95. ;----------------------------
  96.  
  97. (run ("Delete %s ALL QUIET FORCE" #cleanup))
  98.  
  99. (exit)
  100.